﻿@using Inovout.Web.Mvc.Html
@model TreeNode
@if (Model is Tree)
{
    <ul class="tree" data-options="animate:true,checkbox:@Model.Checked.ToString().ToLower()">
        <li id="@Model.Key"  data-selected="@Model.Selected">
                <span>@Model.Content</span>
            @foreach (var node in Model.Children)
            {
                @Html.Tree(node)
            }
        </li>
    </ul>
}
else
{
    <ul class="treenode">
        <li id="@Model.Key"  data-selected="@Model.Selected">
            <span>@Model.Content</span>
            @foreach (var node in Model.Children)
            {
                @Html.Tree(node)
            }
        </li>
    </ul>
}